<?php 
class loginAction extends sfAction{
	public function execute($request){
		$data['email'] = $request->getParameter('login_email', '');
		$data['password'] = $request->getParameter('login_password', '');
		$json = array('status' => '-1', 'message' => 'sai tên đăng nhập/mật khẩu.');
		
		$member = Members::login($data);
		if(count($member)){
			$json['status'] = '1';
		}
		print_r(json_encode($json));
		return sfView::NONE;
	}
}